using System;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace Process.Domain.Entities
{
    /// <summary>
    /// 工艺表
    /// </summary>
    [SugarTable("OperationModel")]
    public class OperationModel : BaseEntity
    {
        /// <summary>
        /// 工艺编码
        /// </summary>
        [SugarColumn(ColumnName = "OperationCode")]
        public string OperationCode { get; set; }

        /// <summary>
        /// 工艺名称
        /// </summary>
        [SugarColumn(ColumnName = "OperationName")]
        public string OperationName { get; set; }

        /// <summary>
        /// 工艺负责人
        /// </summary>
        [SugarColumn(ColumnName = "OperationHead")]
        public string OperationHead { get; set; }        

        /// <summary>
        /// 工艺状态
        /// </summary>
        [SugarColumn(ColumnName = "OperationStates")]
        public bool OperationStates { get; set; }

        /// <summary>
        /// 工艺描述
        /// </summary>
        [SugarColumn(ColumnName = "OperationDesc")]
        public string OperationDesc { get; set; }

        /// <summary>
        /// 工艺物料
        /// </summary>
        [SugarColumn(ColumnName = "OperationMaterials")]
        public string OperationMaterials { get; set; }

        /// <summary>
        /// 工序步骤(JSON格式)
        /// </summary>
        [SugarColumn(ColumnName = "Steps", ColumnDataType = "VARCHAR(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci", IsNullable = true)]
        public string Steps { get; set; }
    }


    public class StepNode
    {
        /// <summary>
        /// 获取或设置步骤的唯一标识符。
        /// </summary>
        public string StepId { get; set; }

        /// <summary>
        /// 获取或设置步骤的名称。
        /// </summary>
        public string StepName { get; set; }

        /// <summary>
        /// 获取或设置下一个步骤的唯一标识符。
        /// </summary>
        public string StepNextId { get; set; }

        /// <summary>
        /// 获取或设置审核用户的唯一标识符。
        /// </summary>
        public long AuditUserId { get; set; }

        /// <summary>
        /// 获取或设置审核用户的名称。
        /// </summary>
        public string AuditUserName { get; set; }
    }

}